Modular and Extensible Parser Implementation using Mixins (DRAFT)

نویسنده

  • Yuuji ICHISUGI
چکیده

This paper describes a method to construct highly modular and extensible recursive descent parser. This parser is used in an extensible Java preprocessor, EPP. EPP can be extended by adding plug-ins which extend Java syntax and add new language features. The EPP's parser consists of small mixins. A recursive descent parser class is constructed by composing these mixins. The syntax accepted by the parser can be extended by adding new mixins.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Declarative, Formal, and Extensible Syntax Definition for AspectJ A Case for Scannerless Generalized-LR Parsing

Aspect-Oriented Programming (AOP) is attracting attention from both research and industry, as illustrated by the ever-growing popularity of AspectJ, the de facto standard AOP extension of Java. From a compiler construction perspective, AspectJ is interesting as it is a typical example of a compositional language, i.e. a language composed of a number of separate languages with different syntacti...

متن کامل

Monadic Memoization Mixins

Memoization is a familiar technique for improving the performance of programs: computed answers are saved so that they can be reused later instead of being recomputed. In a pure functional language, memoization of a function is complicated by the need to manage the table of saved answers between calls to the function, including recursive calls within the function itself. A lazy recursive data s...

متن کامل

Memoizing a Monadic Mixin DSL

Modular extensibility is a highly desirable property of a domain-specific language (DSL): the ability to add new features without affecting the implementation of existing features. Functional mixins (also known as open recursion) are highly suitable for this purpose. We study the use of mixins in Haskell for a modular DSL for search heuristics used in systematic solvers for combinatorial proble...

متن کامل

Context Aware Scanning: Specification, Implementation, and Applications Context-aware Scanning: Specification, Implementation, and Applications — Draft *

This paper introduces new parsing and context-aware scanning algorithms in which the scanner uses contextual information to disambiguate lexical syntax. The parser utilizes a slightly modified LR-style algorithm that passes to the scanner the set of valid symbols which the scanner may return at that point in parsing. This set is comprised of the terminal symbols that are valid for the current s...

متن کامل

Verifiable Parse Table Composition for Deterministic Parsing

One obstacle to the implementation of modular extensions to programming languages lies in the problem of parsing extended languages. Specifically, the parse tables at the heart of traditional LALR(1) parsers are so monolithic and tightly constructed that, in the general case, it is impossible to extend them without regenerating them from the source grammar. Current extensible frameworks employ ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999